<script>var weburl="{yun:}$config.sy_weburl{/yun}",wapurl="{yun:}url m=wap{/yun}";</script>

{yun:}if $smarty.get.type=="yuangong"{/yun}
{yun:}include file="$wapstyle/member/header2.htm"{/yun}
{yun:}else{/yun}
{yun:}include file="$wapstyle/member/header.htm"{/yun}
{yun:}/if{/yun}
<script src="{yun:}$wap_style{/yun}/js/binding.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<script>
    var usertype = "{yun:}$usertype{/yun}";
</script>

<section class="wap_member" {yun:}if $smarty.get.type=="yuangong"{/yun} style="top: 50px;position: relative" {yun:}/if{/yun} >    

    {yun:}if $smarty.get.type=="email"{/yun}

		<ul class="yunset_password mt15">
			<li>
				<span class="yunset_password_mname">邮&nbsp;&nbsp; 箱 </span>
				<div class="yunset_sj_box_y">
					<input type="text" class="yunset_sjtext" name="email" id="emailval" value="{yun:}$member.email{/yun}" placeholder="请输入邮箱">
				</div>
			</li>
			<li>
				<span class="yunset_password_mname">验证码</span>
				<div class=".yunset_sj_box_y">
					<input type="text" name="authcode" class="yunset_sjtext" placeholder="请输入验证码">
					<img id="vcode_img" src="{yun:}$config.sy_wapdomain{/yun}/authcode.inc.php" class="yunset_sj_boxyzm" onclick="checkCode('vcode_img');">
				</div>
			</li>
		</ul>

		<div class="yunset_bth_box">
			<input type="button" value="发送验证邮箱" class="yunset_bth" onclick="check_email('vcode_img');">
		</div>

    {yun:}/if{/yun} 
	
	{yun:}if $smarty.get.type=="moblie"{/yun}

		<ul class="yunset_password mt15">
			<li>
				<span class="yunset_password_mname">手机号码 </span>
				<div class="yunset_sj_box_y">
					<input type="text" class="yunset_sjtext" name="moblie" id="moblieval" value="{yun:}$member.moblie{/yun}" placeholder="请输入手机号">
				</div>
			</li>
		</ul>

		<ul class="yunset_password mt15">
			<li>
				<span class="yunset_password_mname">图片验证码</span>
				<div class="yunset_sj_box_y">
					<input type="text" name="authcode" class="yunset_sjtext" placeholder="输入图片验证码">
					<img id="vcode_img" src="{yun:}$config.sy_wapdomain{/yun}/authcode.inc.php" class="yunset_sj_boxyzm" onclick="checkCode('vcode_img');">

				</div>
			</li>
			<li>
				<span class="yunset_password_mname">短信验证码</span>
				<div class="yunset_sj_box_y">
					<input type="text" class="yunset_sjtext" placeholder="输入验证码" id="moblie_code">
					<a href="javascript:void(0);" onclick="sendmoblie('vcode_img');" class="yunset_sj_yzm" id="time">获取验证码</a>
				</div>
			</li>
		</ul>
		<div class="yunset_bth_box">
			<input type="button" value="提交" class="yunset_bth" onclick="check_moblie('vcode_img');">
		</div>

    {yun:}/if{/yun}
    {yun:}if $smarty.get.type=="yuangong"{/yun}
	
	<!-- jam添加顶部背景和头像 -->
	{yun:}if $already_r.status == 3 or $already_r == ''{/yun} 
		<!-- 拒绝状态 -->
		<div class="top_bkg">
			<img src="/app/template/wap/images/nav_icon_jz.png" class="top_bkg_img">
			<p>员工认证</p>
			<p>目前已有<font id="allnum">0</font>位同事认证</p>
		</div>
		<ul class="bind_jam">
			<li class="company_jam">
				<select style="margin-left: 30px;padding-left: 0;" name="companyid" onchange="all_people()" {yun:}if $member.companyid >0{/yun}  disabled="disabled" {yun:}/if{/yun}>
					<option value="0">请选择您所在的公司</option>
					{yun:}if $all_company{/yun} 
					{yun:}foreach from=$all_company item=company{/yun}
                    <option value="{yun:}$company.uid{/yun}" {yun:}if $member.companyid == $company.uid{/yun} selected="selected" {yun:}/if{/yun}>{yun:}$company.name{/yun}</option> 
                    {yun:}/foreach{/yun} 
                    {yun:}/if{/yun}
				</select>
			</li>
			<li class="realname_jam">
				<input type="text" class="yunset_sjtext" name="realname_jam" id="realname_jam" value="{yun:}$member.realname_jam{/yun}" placeholder="请输入您的真实姓名">
			</li>
			<li class="mobile_jam">
				<input type="text" class="yunset_sjtext" name="mobile_jam" id="mobile_jam" value="{yun:}$member.mobile_jam{/yun}" placeholder="请输入您的手机号">
			</li>
		</ul>

		<div class="yunset_bth_box">
			<input type="button" value="立即认证" class="yunset_bth" onclick="check_yuangong();">
		</div>
		<div class="photochk" style="padding:10px 0;width: 90%;margin: auto;padding-top: 0;margin-bottom: 10px;;">
	        <input id="xieyi" type="checkbox" name="xieyi" value="1" class="inputChk" checked="checked">
	        <em style="width:100%;color: #727171">我已阅读并同意《<a href="javascript:void(0);" onclick="showservices()" style="color: #15a982">用户协议、隐私政策</a>》</em>
    	</div>

    {yun:}else if $already_r.status == 2{/yun}
    	<div class="top_bkg">
			<img src="/app/template/wap/images/nav_icon_jz.png" class="top_bkg_img">
			<p>员工认证</p>
			<p>目前已有<font id="allnum">{yun:}$all_people{/yun}</font>位同事认证</p>
		</div>
		<ul class="bind_jam">
			<li class="company_jam">
				<select style="margin-left: 30px;padding-left: 0;" name="companyid" disabled="true">
					
                    <option value="{yun:}$company.uid{/yun}" {yun:}if $member.companyid == $company.uid{/yun} selected="selected" {yun:}/if{/yun}>{yun:}$company.name{/yun}</option> 
                   
				</select>
			</li>
			<li class="realname_jam">
				<input type="text" class="yunset_sjtext" name="realname_jam" id="realname_jam" value="{yun:}$member.realname_jam{/yun}" placeholder="请输入您的真实姓名" disabled="true">
			</li>
			<li class="mobile_jam">
				<input type="text" class="yunset_sjtext" name="mobile_jam" id="mobile_jam" value="{yun:}$member.mobile_jam{/yun}" placeholder="请输入您的手机号" disabled="true">
			</li>
		</ul>

		<div class="yunset_bth_box">
			<input type="button" value="恭喜您，认证成功" class="yunset_bth" disabled="true">
		</div>
	
    {yun:}else{/yun}
    <p class="jam_tishi">您的认证正在审核中，请耐心等待！</p>
    {yun:}/if{/yun}

    {yun:}/if{/yun}

    <input type="hidden" id="send" value="0" />
    <input type="hidden" id="logid"  name="logid" value="0" />
</section>

<script>
	var second = 0;
	window.setInterval(function () {
		second ++;
	}, 1000);

	var url     = location.href, 
		refer   = document.referrer, 
		timeIn  = Math.ceil(new Date().getTime()/1000); 
	
	$(function(){
 		setTimeout(function(){ 
			$.post('index.php?c=userLog',{url:url,refer:refer,timeIn:timeIn,second:2,opera:13},function(data){
				if(data){
					$("#logid").val(data);
				}
			})
		},2000);
		
    }) 
	
	window.onbeforeunload = function(){
		var logid = $("#logid").val();
 		if(second>2){ 
			$.post('index.php?c=gxUserLog',{id:logid,second:second},function(data){
				if(data) {
					return false;
				}
			})
		}
   	}
</script>
